package com.yanqu.road.logic.bussiness.voucher;

import com.yanqu.road.entity.voucher.UserVoucherData;
import com.yanqu.road.entity.voucher.config.VoucherConfigInfo;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class VoucherBusiness {

    public static Map<Integer, List<VoucherConfigInfo>> getVoucherConfigInfoMap() {
        return DaoHelper.getVoucherInfoDaoImpl().getVoucherConfigInfoMap();
    }

    public static boolean addVoucherInfo(VoucherConfigInfo voucherConfigInfo) {
        return DaoHelper.getVoucherInfoDaoImpl().add(voucherConfigInfo);
    }

    public static boolean updateVoucherInfo(VoucherConfigInfo voucherConfigInfo) {
        return DaoHelper.getVoucherInfoDaoImpl().update(voucherConfigInfo);
    }

    public static Map<Integer, List<UserVoucherData>> getUserVoucherDataMap(long userId) {
        return DaoHelper.getUserVoucherDataDaoImpl().getUserVoucherDataMap(userId);
    }

    public static boolean addUserVoucherData(UserVoucherData userVoucherData) {
        return DaoHelper.getUserVoucherDataDaoImpl().add(userVoucherData);
    }

    public static boolean updateUserVoucherData(UserVoucherData userVoucherData) {
        return DaoHelper.getUserVoucherDataDaoImpl().update(userVoucherData);
    }

}
